import request from '@/utils/request'
export function getGroupAll (groupleader) {
  return request({
    url: '/group/newGroup',
    method: 'get',
    params: {
      groupleader: groupleader
    }
  })
}

export function getJoinMenu (userid) {
  return request({
    url: '/group/JoinGroup',
    method: 'get',
    params: {
      userid: userid
    }
  })
}

export function getGroupLeader (groupid) {
  return request({
    url: '/group/GroupLeader',
    method: 'get',
    params: {
      groupid: groupid
    }
  })
}

export function addGroup (form) {
  return request({
    url: '/group/addgroup',
    method: 'post',
    data: form
  })
}

export function ChoseJoingroup (form2) {
  return request({
    url: '/group/ChoseJoingroup',
    method: 'post',
    data: form2
  })
}

export function getInfo (groupid) {
  return request({
    url: '/groupList/GroupSearch',
    method: 'get',
    params: {
      groupid: groupid
    }
  })
}

export function JoinGroupInfo (form2) {
  return request({
    url: '/groupList/JoinGroup',
    method: 'post',
    data: form2
  })
}
